import request from '@/utils/request'

// 获取房源信息
export const getHouseInfo = id => {
  return request({
    url: `houses/${id}`
  })
}

// 获取是否收藏
export const getIsFavorite = id => {
  return request({
    url: `/user/favorites/${id}`
  })
}

// 添加收藏
export const addFavorites = id => {
  return request({
    url: `/user/favorites/${id}`,
    method: 'POST'
  })
}

// 取消收藏
export const deleteFavorites = id => {
  return request({
    url: `/user/favorites/${id}`,
    method: 'DELETE'
  })
}
